package com.taoym.voucher.common.enums;

import lombok.Getter;

/**
 * @coder taoym
 * @datetime 2021/7/3 23:15
 * @desc 活动平台枚举
 */
@Getter
public enum ActivityPlatformEnum implements EnumsCommon {

    MEI_TUAN(1, "美团"),
    ELM(2, "饿了么"),
    PDD(3, "拼多多"),
    JU_HE(4, "聚合"),
    JD(5, "京东"),
    WPH(6, "唯品会"),
    ;

    private final Integer code;
    private final String msg;

    ActivityPlatformEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        for (ActivityPlatformEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value.getMsg();
            }
        }
        return null;
    }
}
